from django.apps import AppConfig
import os
import logging

logger = logging.getLogger(__name__)


class EphmApiConfig(AppConfig):
    default_auto_field = "django.db.models.BigAutoField"
    name = "ephm_api"

    # def ready(self):
    #     # 只在主进程中启动监控线程
    #     if os.environ.get("RUN_MAIN") == "true":
    #         try:
    #             from .qdas_monitor import QdasMonitor

    #             monitor = QdasMonitor()
    #             monitor.start()
    #         except Exception as e:
    #             logger.error(f"启动 Qdas 监控时出现错误: {e}", exc_info=True)
